package com.zlsx.androidutil.androidview;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.zlsx.androidutil.R;
import com.zlsx.androidutil.androidview.buttonview.ButtonActivity;
import com.zlsx.androidutil.androidview.pickcolorview.ColorPickActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author zlsx
 * @time: 2019/8/26 10:46
 * @Description:
 **/
public class ViewActivity extends AppCompatActivity {
    @BindView(R.id.color_picker)
    Button colorPicker;
    @BindView(R.id.custom_button)
    Button customButton;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view);
        ButterKnife.bind(this);
    }



    @OnClick({R.id.color_picker, R.id.custom_button})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.color_picker:
                startActivity(new Intent(ViewActivity.this, ColorPickActivity.class));
                break;
            case R.id.custom_button:
                startActivity(new Intent(ViewActivity.this, ButtonActivity.class));
                break;
        }
    }
}
